import Vue from 'vue'
import App from './App.vue'
import VueLazyload from 'vue-lazyload'
//图片懒加载
import lazyload  from '@/assets/images/lazyload.png'
Vue.use(VueLazyload,{
  loading:lazyload
});
import '@/mock/mockServer.js'
//引入路由
import router from '@/router'
//引入store仓库
import store  from './store'
//引入三级联动并注册为全局组件
import TypeNav from '@/components/TypeNav'
Vue.component('TypeNav',TypeNav);
//引入swiper轮播样式
import 'swiper/css/swiper.css'
import Carousel from '@/components/Carousel'
Vue.component(Carousel.name,Carousel)
//引入分页器
import Pagination from '@/components/Pagination'
Vue.component(Pagination.name,Pagination)
Vue.config.productionTip = false;
import * as API from '@/api'
import {MessageBox} from 'element-ui'
Vue.prototype.$msgbox = MessageBox;
Vue.prototype.$alert = MessageBox.alert;
//引入表单校验插件
import '@/plugings/validate';

new Vue({
  render: h => h(App),
  router,
  store,
  beforeCreate(){
    Vue.prototype.$bus=this;
    Vue.prototype.$API=API;
  }
}).$mount('#app')
